<?php                                                                                                                                                                                                                             
    header('Access-Control-Allow-Origin: *');
	header("Access-Control-Allow-Method:POST,GET");  
	header ( "Content-Type: text/html; charset=UTF-8" );
	require_once './mysql.class.php';
	require_once './response.class.php';

	
	$YMDTime = date ( "Y-m-d" );										        
	
	$sqlhelper = new sqlhelper();
	$re = new Response();
												        
	//查询数据库对应的条数
	$sql = "select url from blxbconfession_headurl where effectivetime >= $YMDTime limit 1";
	if ($sqlhelper->getResultNum($sql) == 0) {
	     $message = array(
	        'url' => "http://ww4.sinaimg.cn/large/8c2e9604gw1fajlce6cquj211y0lgna1.jpg",
	     );  
	}else{
		$arr = $sqlhelper->fetchone($sql);
		$sqlhelper->close_connect();
		$message = array(
			'url'=>$arr['url']		
		);	
	}

	$re->show(200,'success',$message);
	exit();

